package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(32)"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(30)"`
	RoleCode string `gorm:"type:varchar(30)"`
}

type Node struct {
	gorm.Model
	NodeTitle string `gorm:"type:varchar(50)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Good struct {
	gorm.Model
	GoodName  string `gorm:"type:varchar(30)"`
	GoodPrice int    `gorm:"type:int"`
	GoodNum   int    `gorm:"type:int"`
}

type GoodOrder struct {
	gorm.Model
	OrderCode     string `gorm:"type:varchar(30)"`
	GoodOrderName string `gorm:"type:varchar(30)"`
	GoodOrderTel  string `gorm:"type:varchar(30)"`
	Gid           int    `gorm:"type:int"`
}

type GoodOrderList struct {
	OrderId       int
	GoodName      string
	GoodPrice     int
	GoodNum       int
	OrderCode     string
	GoodOrderName string
	GoodOrderTel  string
}
